﻿using System;
using System.Collections.Generic;
using System.Text;

namespace RaisingStudio.Data.SharePoint.Entities
{
    public partial class _Documents : RaisingStudio.Data.Expressions.TableExpression, RaisingStudio.Data.Expressions.IQueryExpression<_Documents>
    {
        #region Constructor (s) / Destructor
        /// <summary>
        /// Constructor (s) / Destructor.
        /// </summary>
        public _Documents() : base("Documents")
        {
        }
        #endregion
        #region Members
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _ContentTypeId = "ContentTypeId";
        public RaisingStudio.Data.Expressions.ColumnExpression ContentTypeId { get { return _ContentTypeId; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression __ModerationComments = "_ModerationComments";
        public RaisingStudio.Data.Expressions.ColumnExpression _ModerationComments { get { return __ModerationComments; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _FileLeafRef = "FileLeafRef";
        public RaisingStudio.Data.Expressions.ColumnExpression FileLeafRef { get { return _FileLeafRef; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _Modified_x0020_By = "Modified_x0020_By";
        public RaisingStudio.Data.Expressions.ColumnExpression Modified_x0020_By { get { return _Modified_x0020_By; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _Created_x0020_By = "Created_x0020_By";
        public RaisingStudio.Data.Expressions.ColumnExpression Created_x0020_By { get { return _Created_x0020_By; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _File_x0020_Type = "File_x0020_Type";
        public RaisingStudio.Data.Expressions.ColumnExpression File_x0020_Type { get { return _File_x0020_Type; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _HTML_x0020_File_x0020_Type = "HTML_x0020_File_x0020_Type";
        public RaisingStudio.Data.Expressions.ColumnExpression HTML_x0020_File_x0020_Type { get { return _HTML_x0020_File_x0020_Type; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression __SourceUrl = "_SourceUrl";
        public RaisingStudio.Data.Expressions.ColumnExpression _SourceUrl { get { return __SourceUrl; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression __SharedFileIndex = "_SharedFileIndex";
        public RaisingStudio.Data.Expressions.ColumnExpression _SharedFileIndex { get { return __SharedFileIndex; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _Title = "Title";
        public RaisingStudio.Data.Expressions.ColumnExpression Title { get { return _Title; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _TemplateUrl = "TemplateUrl";
        public RaisingStudio.Data.Expressions.ColumnExpression TemplateUrl { get { return _TemplateUrl; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _xd_ProgID = "xd_ProgID";
        public RaisingStudio.Data.Expressions.ColumnExpression xd_ProgID { get { return _xd_ProgID; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _xd_Signature = "xd_Signature";
        public RaisingStudio.Data.Expressions.ColumnExpression xd_Signature { get { return _xd_Signature; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression __dlc_Exempt = "_dlc_Exempt";
        public RaisingStudio.Data.Expressions.ColumnExpression _dlc_Exempt { get { return __dlc_Exempt; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression __dlc_ExpireDateSaved = "_dlc_ExpireDateSaved";
        public RaisingStudio.Data.Expressions.ColumnExpression _dlc_ExpireDateSaved { get { return __dlc_ExpireDateSaved; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression __dlc_ExpireDate = "_dlc_ExpireDate";
        public RaisingStudio.Data.Expressions.ColumnExpression _dlc_ExpireDate { get { return __dlc_ExpireDate; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _Disposti = "Disposti";
        public RaisingStudio.Data.Expressions.ColumnExpression Disposti { get { return _Disposti; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _ID = "ID";
        public RaisingStudio.Data.Expressions.ColumnExpression ID { get { return _ID; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _ContentType = "ContentType";
        public RaisingStudio.Data.Expressions.ColumnExpression ContentType { get { return _ContentType; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _Created = "Created";
        public RaisingStudio.Data.Expressions.ColumnExpression Created { get { return _Created; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _Author = "Author";
        public RaisingStudio.Data.Expressions.ColumnExpression Author { get { return _Author; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _Modified = "Modified";
        public RaisingStudio.Data.Expressions.ColumnExpression Modified { get { return _Modified; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _Editor = "Editor";
        public RaisingStudio.Data.Expressions.ColumnExpression Editor { get { return _Editor; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression __HasCopyDestinations = "_HasCopyDestinations";
        public RaisingStudio.Data.Expressions.ColumnExpression _HasCopyDestinations { get { return __HasCopyDestinations; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression __CopySource = "_CopySource";
        public RaisingStudio.Data.Expressions.ColumnExpression _CopySource { get { return __CopySource; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression __ModerationStatus = "_ModerationStatus";
        public RaisingStudio.Data.Expressions.ColumnExpression _ModerationStatus { get { return __ModerationStatus; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _FileRef = "FileRef";
        public RaisingStudio.Data.Expressions.ColumnExpression FileRef { get { return _FileRef; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _FileDirRef = "FileDirRef";
        public RaisingStudio.Data.Expressions.ColumnExpression FileDirRef { get { return _FileDirRef; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _Last_x0020_Modified = "Last_x0020_Modified";
        public RaisingStudio.Data.Expressions.ColumnExpression Last_x0020_Modified { get { return _Last_x0020_Modified; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _Created_x0020_Date = "Created_x0020_Date";
        public RaisingStudio.Data.Expressions.ColumnExpression Created_x0020_Date { get { return _Created_x0020_Date; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _File_x0020_Size = "File_x0020_Size";
        public RaisingStudio.Data.Expressions.ColumnExpression File_x0020_Size { get { return _File_x0020_Size; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _FSObjType = "FSObjType";
        public RaisingStudio.Data.Expressions.ColumnExpression FSObjType { get { return _FSObjType; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _PermMask = "PermMask";
        public RaisingStudio.Data.Expressions.ColumnExpression PermMask { get { return _PermMask; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _CheckedOutUserId = "CheckedOutUserId";
        public RaisingStudio.Data.Expressions.ColumnExpression CheckedOutUserId { get { return _CheckedOutUserId; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _IsCheckedoutToLocal = "IsCheckedoutToLocal";
        public RaisingStudio.Data.Expressions.ColumnExpression IsCheckedoutToLocal { get { return _IsCheckedoutToLocal; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _CheckoutUser = "CheckoutUser";
        public RaisingStudio.Data.Expressions.ColumnExpression CheckoutUser { get { return _CheckoutUser; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _UniqueId = "UniqueId";
        public RaisingStudio.Data.Expressions.ColumnExpression UniqueId { get { return _UniqueId; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _ProgId = "ProgId";
        public RaisingStudio.Data.Expressions.ColumnExpression ProgId { get { return _ProgId; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _ScopeId = "ScopeId";
        public RaisingStudio.Data.Expressions.ColumnExpression ScopeId { get { return _ScopeId; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _VirusStatus = "VirusStatus";
        public RaisingStudio.Data.Expressions.ColumnExpression VirusStatus { get { return _VirusStatus; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _CheckedOutTitle = "CheckedOutTitle";
        public RaisingStudio.Data.Expressions.ColumnExpression CheckedOutTitle { get { return _CheckedOutTitle; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression __CheckinComment = "_CheckinComment";
        public RaisingStudio.Data.Expressions.ColumnExpression _CheckinComment { get { return __CheckinComment; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _LinkCheckedOutTitle = "LinkCheckedOutTitle";
        public RaisingStudio.Data.Expressions.ColumnExpression LinkCheckedOutTitle { get { return _LinkCheckedOutTitle; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression __EditMenuTableStart = "_EditMenuTableStart";
        public RaisingStudio.Data.Expressions.ColumnExpression _EditMenuTableStart { get { return __EditMenuTableStart; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression __EditMenuTableEnd = "_EditMenuTableEnd";
        public RaisingStudio.Data.Expressions.ColumnExpression _EditMenuTableEnd { get { return __EditMenuTableEnd; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _LinkFilenameNoMenu = "LinkFilenameNoMenu";
        public RaisingStudio.Data.Expressions.ColumnExpression LinkFilenameNoMenu { get { return _LinkFilenameNoMenu; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _LinkFilename = "LinkFilename";
        public RaisingStudio.Data.Expressions.ColumnExpression LinkFilename { get { return _LinkFilename; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _DocIcon = "DocIcon";
        public RaisingStudio.Data.Expressions.ColumnExpression DocIcon { get { return _DocIcon; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _ServerUrl = "ServerUrl";
        public RaisingStudio.Data.Expressions.ColumnExpression ServerUrl { get { return _ServerUrl; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _EncodedAbsUrl = "EncodedAbsUrl";
        public RaisingStudio.Data.Expressions.ColumnExpression EncodedAbsUrl { get { return _EncodedAbsUrl; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _BaseName = "BaseName";
        public RaisingStudio.Data.Expressions.ColumnExpression BaseName { get { return _BaseName; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _FileSizeDisplay = "FileSizeDisplay";
        public RaisingStudio.Data.Expressions.ColumnExpression FileSizeDisplay { get { return _FileSizeDisplay; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _MetaInfo = "MetaInfo";
        public RaisingStudio.Data.Expressions.ColumnExpression MetaInfo { get { return _MetaInfo; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression __Level = "_Level";
        public RaisingStudio.Data.Expressions.ColumnExpression _Level { get { return __Level; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression __IsCurrentVersion = "_IsCurrentVersion";
        public RaisingStudio.Data.Expressions.ColumnExpression _IsCurrentVersion { get { return __IsCurrentVersion; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _SelectTitle = "SelectTitle";
        public RaisingStudio.Data.Expressions.ColumnExpression SelectTitle { get { return _SelectTitle; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _SelectFilename = "SelectFilename";
        public RaisingStudio.Data.Expressions.ColumnExpression SelectFilename { get { return _SelectFilename; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _Edit = "Edit";
        public RaisingStudio.Data.Expressions.ColumnExpression Edit { get { return _Edit; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _owshiddenversion = "owshiddenversion";
        public RaisingStudio.Data.Expressions.ColumnExpression owshiddenversion { get { return _owshiddenversion; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression __UIVersion = "_UIVersion";
        public RaisingStudio.Data.Expressions.ColumnExpression _UIVersion { get { return __UIVersion; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression __UIVersionString = "_UIVersionString";
        public RaisingStudio.Data.Expressions.ColumnExpression _UIVersionString { get { return __UIVersionString; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _InstanceID = "InstanceID";
        public RaisingStudio.Data.Expressions.ColumnExpression InstanceID { get { return _InstanceID; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _Order = "Order";
        public RaisingStudio.Data.Expressions.ColumnExpression Order { get { return _Order; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _GUID = "GUID";
        public RaisingStudio.Data.Expressions.ColumnExpression GUID { get { return _GUID; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _WorkflowVersion = "WorkflowVersion";
        public RaisingStudio.Data.Expressions.ColumnExpression WorkflowVersion { get { return _WorkflowVersion; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _WorkflowInstanceID = "WorkflowInstanceID";
        public RaisingStudio.Data.Expressions.ColumnExpression WorkflowInstanceID { get { return _WorkflowInstanceID; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _ParentVersionString = "ParentVersionString";
        public RaisingStudio.Data.Expressions.ColumnExpression ParentVersionString { get { return _ParentVersionString; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _ParentLeafName = "ParentLeafName";
        public RaisingStudio.Data.Expressions.ColumnExpression ParentLeafName { get { return _ParentLeafName; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _Combine = "Combine";
        public RaisingStudio.Data.Expressions.ColumnExpression Combine { get { return _Combine; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _RepairDocument = "RepairDocument";
        public RaisingStudio.Data.Expressions.ColumnExpression RepairDocument { get { return _RepairDocument; } }

		#endregion

        public static implicit operator RaisingStudio.Data.Expressions.ConditionExpression(_Documents Documents)
        {
            return new RaisingStudio.Data.Expressions.ConditionExpression();
        }

        public RaisingStudio.Data.Expressions.ConditionExpression OrderBy(RaisingStudio.Data.Expressions.ColumnExpression columnExpression)
        {
             RaisingStudio.Data.Expressions.ConditionExpression conditionExpression = this;
             return conditionExpression.OrderBy(columnExpression);
        }

        public RaisingStudio.Data.Expressions.ConditionExpression OrderBy(RaisingStudio.Data.Expressions.ColumnExpression columnExpression, RaisingStudio.Data.Expressions.SortingDirection sortingDirection)
        {
            RaisingStudio.Data.Expressions.ConditionExpression conditionExpression = this;
            return conditionExpression.OrderBy(columnExpression, sortingDirection);
        }

        public RaisingStudio.Data.Expressions.ConditionExpression Where(RaisingStudio.Data.Expressions.ExpressionElement expressionElement)
        {
            RaisingStudio.Data.Expressions.ConditionExpression conditionExpression = this;
            return conditionExpression.Where(expressionElement);
        }

        public static implicit operator RaisingStudio.Data.Expressions.ColumnExpressionCollection(_Documents Documents)
        {
            return new RaisingStudio.Data.Expressions.ColumnExpressionCollection(Documents);
        }

        public static implicit operator RaisingStudio.Data.Expressions.ColumnExpression[](_Documents Documents)
        {
            return new RaisingStudio.Data.Expressions.ColumnExpression[]
                        {                            
                            Documents.ContentTypeId,
                            Documents._ModerationComments,
                            Documents.FileLeafRef,
                            Documents.Modified_x0020_By,
                            Documents.Created_x0020_By,
                            Documents.File_x0020_Type,
                            Documents.HTML_x0020_File_x0020_Type,
                            Documents._SourceUrl,
                            Documents._SharedFileIndex,
                            Documents.Title,
                            Documents.TemplateUrl,
                            Documents.xd_ProgID,
                            Documents.xd_Signature,
                            Documents._dlc_Exempt,
                            Documents._dlc_ExpireDateSaved,
                            Documents._dlc_ExpireDate,
                            Documents.Disposti,
                            Documents.ID,
                            Documents.ContentType,
                            Documents.Created,
                            Documents.Author,
                            Documents.Modified,
                            Documents.Editor,
                            Documents._HasCopyDestinations,
                            Documents._CopySource,
                            Documents._ModerationStatus,
                            Documents.FileRef,
                            Documents.FileDirRef,
                            Documents.Last_x0020_Modified,
                            Documents.Created_x0020_Date,
                            Documents.File_x0020_Size,
                            Documents.FSObjType,
                            Documents.PermMask,
                            Documents.CheckedOutUserId,
                            Documents.IsCheckedoutToLocal,
                            Documents.CheckoutUser,
                            Documents.UniqueId,
                            Documents.ProgId,
                            Documents.ScopeId,
                            Documents.VirusStatus,
                            Documents.CheckedOutTitle,
                            Documents._CheckinComment,
                            Documents.LinkCheckedOutTitle,
                            Documents._EditMenuTableStart,
                            Documents._EditMenuTableEnd,
                            Documents.LinkFilenameNoMenu,
                            Documents.LinkFilename,
                            Documents.DocIcon,
                            Documents.ServerUrl,
                            Documents.EncodedAbsUrl,
                            Documents.BaseName,
                            Documents.FileSizeDisplay,
                            Documents.MetaInfo,
                            Documents._Level,
                            Documents._IsCurrentVersion,
                            Documents.SelectTitle,
                            Documents.SelectFilename,
                            Documents.Edit,
                            Documents.owshiddenversion,
                            Documents._UIVersion,
                            Documents._UIVersionString,
                            Documents.InstanceID,
                            Documents.Order,
                            Documents.GUID,
                            Documents.WorkflowVersion,
                            Documents.WorkflowInstanceID,
                            Documents.ParentVersionString,
                            Documents.ParentLeafName,
                            Documents.Combine,
                            Documents.RepairDocument,
                        };
        }

        public RaisingStudio.Data.Expressions.ColumnExpressionCollection Except(params RaisingStudio.Data.Expressions.ColumnExpression[] columns)
        {
            RaisingStudio.Data.Expressions.ColumnExpressionCollection columnExpressionCollection = this;
            return columnExpressionCollection.Except(columns);
        }

    
        public static implicit operator RaisingStudio.Data.Expressions.QueryExpression<_Documents>(_Documents Documents)
        {
            return new RaisingStudio.Data.Expressions.QueryExpression<_Documents>(Documents);
        }


        #region IQueryExpression<_Documents> 成员

        _Documents RaisingStudio.Data.Expressions.IQueryExpression<_Documents>.Value
        {
            get { return Documents._; }
        }

        #endregion

        #region IQueryExpression 成员

        RaisingStudio.Data.Expressions.TableExpression RaisingStudio.Data.Expressions.IQueryExpression.Table
        {
            get { return this; }
        }

        RaisingStudio.Data.Expressions.ConditionExpression RaisingStudio.Data.Expressions.IQueryExpression.Condition
        {
            get { return this; }
        }

        RaisingStudio.Data.Expressions.ColumnExpressionCollection RaisingStudio.Data.Expressions.IQueryExpression.Columns
        {
            get { return null; }
        }

        #endregion
    }

    partial class Documents
    {
        #region Members
        public static readonly _Documents _ = new _Documents();
		#endregion
    }
}
